<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>
<HEAD>
   <TITLE>class  SG_EXPORT osg::Polytope</TITLE>
   <META NAME="GENERATOR" CONTENT="DOC++ 3.4.8">
</HEAD>
<BODY BGCOLOR="#ffffff">

<H2>class  SG_EXPORT <A HREF="#DOC.DOCU">osg::Polytope</A></H2></H2><BLOCKQUOTE>A Polytope class for representing convex clipping volumes made up.</BLOCKQUOTE>
<HR>

<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>typedef  <!1><A HREF="fast_back_stack.html">fast_back_stack</A>&lt;ClippingMask&gt;inline  MaskStack <B><A HREF="#DOC.2.94.1">Polytope</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   <B><A HREF="#DOC.2.94.2">Polytope</A></B>(const <!1><A HREF="Polytope.html#DOC.2.94.2">Polytope</A>&amp; cv)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   <B><A HREF="#DOC.2.94.3">Polytope</A></B>(const PlaneList&amp; pl)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   <B><A HREF="#DOC.2.94.4">~Polytope</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   void <B><A HREF="#DOC.2.94.5">clear</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   <!1><A HREF="Polytope.html">Polytope</A>&amp; <B><A HREF="#DOC.2.94.6">operator = </A></B>(const <!1><A HREF="Polytope.html">Polytope</A>&amp; cv)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.94.7">setToUnitFrustum</A></B>(bool withNear=true, bool withFar=true)
<DD><I>Create a Polytope with is cube, centered at 0,0,0, with sides of 2 units</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   void <B><A HREF="#DOC.2.94.8">set</A></B>(const PlaneList&amp; pl)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   void <B><A HREF="#DOC.2.94.9">add</A></B>(const <!1><A HREF="Plane.html">osg::Plane</A>&amp; pl)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   void <B><A HREF="#DOC.2.94.10">flip</A></B>()
<DD><I>flip/reverse the orientation of all the planes</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   PlaneList&amp; <B><A HREF="#DOC.2.94.11">getPlaneList</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   const PlaneList&amp; <B><A HREF="#DOC.2.94.12">getPlaneList</A></B>() const 
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   void <B><A HREF="#DOC.2.94.13">setReferenceVertexList</A></B>(VertexList&amp; vertices)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   VertexList&amp; <B><A HREF="#DOC.2.94.14">getReferenceVertexList</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   const VertexList&amp; <B><A HREF="#DOC.2.94.15">getReferenceVertexList</A></B>() const 
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   void <B><A HREF="#DOC.2.94.16">setupMask</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   ClippingMask&amp; <B><A HREF="#DOC.2.94.17">getCurrentMask</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   ClippingMask <B><A HREF="#DOC.2.94.18">getCurrentMask</A></B>() const 
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   void <B><A HREF="#DOC.2.94.19">setResultMask</A></B>(ClippingMask mask)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   ClippingMask <B><A HREF="#DOC.2.94.20">getResultMask</A></B>() const 
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>MaskStack&amp; <B><A HREF="#DOC.2.94.21">getMaskStack</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>const MaskStack&amp; <B><A HREF="#DOC.2.94.22">getMaskStack</A></B>() const 
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   void <B><A HREF="#DOC.2.94.23">pushCurrentMask</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   void <B><A HREF="#DOC.2.94.24">popCurrentMask</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   const bool <B><A HREF="#DOC.2.94.25">contains</A></B>(const <!1><A HREF="Vec3.html">osg::Vec3</A>&amp; v) const 
<DD><I>Check whether a vertex is contained with clipping set</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   const bool <B><A HREF="#DOC.2.94.26">contains</A></B>(const std::vector&lt;<!1><A HREF="Vec3.html">Vec3</A>&gt;&amp; vertices)
<DD><I>Check whether any part of vertex list is contained with clipping set</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   const bool <B><A HREF="#DOC.2.94.27">contains</A></B>(const <!1><A HREF="BoundingSphere.html">osg::BoundingSphere</A>&amp; bs)
<DD><I>Check whether any part of a bounding sphere is contained within clipping set.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   const bool <B><A HREF="#DOC.2.94.28">contains</A></B>(const <!1><A HREF="BoundingBox.html">osg::BoundingBox</A>&amp; bb)
<DD><I>Check whether any part of a bounding box is contained within clipping set.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   const bool <B><A HREF="#DOC.2.94.29">containsAllOf</A></B>(const std::vector&lt;<!1><A HREF="Vec3.html">Vec3</A>&gt;&amp; vertices)
<DD><I>Check whether all of vertex list is contained with clipping set</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   const bool <B><A HREF="#DOC.2.94.30">containsAllOf</A></B>(const <!1><A HREF="BoundingSphere.html">osg::BoundingSphere</A>&amp; bs)
<DD><I>Check whether the entire bounding sphere is contained within clipping set</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   const bool <B><A HREF="#DOC.2.94.31">containsAllOf</A></B>(const <!1><A HREF="BoundingBox.html">osg::BoundingBox</A>&amp; bb)
<DD><I>Check whether the entire bounding box is contained within clipping set</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   void <B><A HREF="#DOC.2.94.32">transform</A></B>(const <!1><A HREF="Matrix.html">osg::Matrix</A>&amp; matrix)
<DD><I>Transform the clipping set by matrix.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   void <B><A HREF="#DOC.2.94.33">transformProvidingInverse</A></B>(const <!1><A HREF="Matrix.html">osg::Matrix</A>&amp; matrix)
<DD><I>Transform the clipping set by provide a pre inverted matrix.</I>
</DL></P>

<P><DL>
<DT><H3>Protected Fields</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>MaskStack <B><A HREF="#DOC.2.94.34">_maskStack</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>ClippingMask <B><A HREF="#DOC.2.94.35">_resultMask</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>PlaneList <B><A HREF="#DOC.2.94.36">_planeList</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>VertexList <B><A HREF="#DOC.2.94.37">_referenceVertexList</A></B>
</DL></P>

</DL>

<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>A Polytope class for representing convex clipping volumes made up.
When adding planes, their normals should point inwards (into the volume) </BLOCKQUOTE>
<DL>

<A NAME="Polytope"></A>
<A NAME="DOC.2.94.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>typedef  <!1><A HREF="fast_back_stack.html">fast_back_stack</A>&lt;ClippingMask&gt;inline  MaskStack Polytope()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Polytope"></A>
<A NAME="DOC.2.94.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   Polytope(const <!1><A HREF="Polytope.html#DOC.2.94.2">Polytope</A>&amp; cv)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Polytope"></A>
<A NAME="DOC.2.94.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   Polytope(const PlaneList&amp; pl)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="~Polytope"></A>
<A NAME="DOC.2.94.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   ~Polytope()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="clear"></A>
<A NAME="DOC.2.94.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   void clear()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator = "></A>
<A NAME="DOC.2.94.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   <!1><A HREF="Polytope.html">Polytope</A>&amp; operator = (const <!1><A HREF="Polytope.html">Polytope</A>&amp; cv)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="setToUnitFrustum"></A>
<A NAME="DOC.2.94.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void setToUnitFrustum(bool withNear=true, bool withFar=true)</B></TT>
<DD>Create a Polytope with is cube, centered at 0,0,0, with sides of 2 units
<DL><DT><DD></DL><P>
<A NAME="set"></A>
<A NAME="DOC.2.94.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   void set(const PlaneList&amp; pl)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="add"></A>
<A NAME="DOC.2.94.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   void add(const <!1><A HREF="Plane.html">osg::Plane</A>&amp; pl)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="flip"></A>
<A NAME="DOC.2.94.10"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   void flip()</B></TT>
<DD>flip/reverse the orientation of all the planes
<DL><DT><DD></DL><P>
<A NAME="getPlaneList"></A>
<A NAME="DOC.2.94.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   PlaneList&amp; getPlaneList()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="getPlaneList"></A>
<A NAME="DOC.2.94.12"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   const PlaneList&amp; getPlaneList() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="setReferenceVertexList"></A>
<A NAME="DOC.2.94.13"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   void setReferenceVertexList(VertexList&amp; vertices)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="getReferenceVertexList"></A>
<A NAME="DOC.2.94.14"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   VertexList&amp; getReferenceVertexList()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="getReferenceVertexList"></A>
<A NAME="DOC.2.94.15"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   const VertexList&amp; getReferenceVertexList() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="setupMask"></A>
<A NAME="DOC.2.94.16"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   void setupMask()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="getCurrentMask"></A>
<A NAME="DOC.2.94.17"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   ClippingMask&amp; getCurrentMask()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="getCurrentMask"></A>
<A NAME="DOC.2.94.18"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   ClippingMask getCurrentMask() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="setResultMask"></A>
<A NAME="DOC.2.94.19"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   void setResultMask(ClippingMask mask)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="getResultMask"></A>
<A NAME="DOC.2.94.20"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   ClippingMask getResultMask() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="getMaskStack"></A>
<A NAME="DOC.2.94.21"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>MaskStack&amp; getMaskStack()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="getMaskStack"></A>
<A NAME="DOC.2.94.22"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>const MaskStack&amp; getMaskStack() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="pushCurrentMask"></A>
<A NAME="DOC.2.94.23"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   void pushCurrentMask()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="popCurrentMask"></A>
<A NAME="DOC.2.94.24"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   void popCurrentMask()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="contains"></A>
<A NAME="DOC.2.94.25"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   const bool contains(const <!1><A HREF="Vec3.html">osg::Vec3</A>&amp; v) const </B></TT>
<DD>Check whether a vertex is contained with clipping set
<DL><DT><DD></DL><P>
<A NAME="contains"></A>
<A NAME="DOC.2.94.26"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   const bool contains(const std::vector&lt;<!1><A HREF="Vec3.html">Vec3</A>&gt;&amp; vertices)</B></TT>
<DD>Check whether any part of vertex list is contained with clipping set
<DL><DT><DD></DL><P>
<A NAME="contains"></A>
<A NAME="DOC.2.94.27"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   const bool contains(const <!1><A HREF="BoundingSphere.html">osg::BoundingSphere</A>&amp; bs)</B></TT>
<DD>Check whether any part of a bounding sphere is contained within clipping set.
Using a mask to determine which planes should be used for the check, and
modifying the mask to turn off planes which wouldn't contribute to clipping
of any internal objects.  This feature is used in osgUtil::CullVisitor
to prevent redundant plane checking.
<DL><DT><DD></DL><P>
<A NAME="contains"></A>
<A NAME="DOC.2.94.28"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   const bool contains(const <!1><A HREF="BoundingBox.html">osg::BoundingBox</A>&amp; bb)</B></TT>
<DD>Check whether any part of a bounding box is contained within clipping set.
Using a mask to determine which planes should be used for the check, and
modifying the mask to turn off planes which wouldn't contribute to clipping
of any internal objects.  This feature is used in osgUtil::CullVisitor
to prevent redundant plane checking.
<DL><DT><DD></DL><P>
<A NAME="containsAllOf"></A>
<A NAME="DOC.2.94.29"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   const bool containsAllOf(const std::vector&lt;<!1><A HREF="Vec3.html">Vec3</A>&gt;&amp; vertices)</B></TT>
<DD>Check whether all of vertex list is contained with clipping set
<DL><DT><DD></DL><P>
<A NAME="containsAllOf"></A>
<A NAME="DOC.2.94.30"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   const bool containsAllOf(const <!1><A HREF="BoundingSphere.html">osg::BoundingSphere</A>&amp; bs)</B></TT>
<DD>Check whether the entire bounding sphere is contained within clipping set
<DL><DT><DD></DL><P>
<A NAME="containsAllOf"></A>
<A NAME="DOC.2.94.31"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   const bool containsAllOf(const <!1><A HREF="BoundingBox.html">osg::BoundingBox</A>&amp; bb)</B></TT>
<DD>Check whether the entire bounding box is contained within clipping set
<DL><DT><DD></DL><P>
<A NAME="transform"></A>
<A NAME="DOC.2.94.32"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   void transform(const <!1><A HREF="Matrix.html">osg::Matrix</A>&amp; matrix)</B></TT>
<DD>Transform the clipping set by matrix.  Note, this operations carries out
the calculation of the inverse of the matrix since to transforms
planes must be multiplied my the inverse transposed. This
make this operation expensive.  If the inverse has been already
calculated elsewhere then use transformProvidingInverse() instead.
See http://www.worldserver.com/turk/computergraphics/NormalTransformations.pdf
<DL><DT><DD></DL><P>
<A NAME="transformProvidingInverse"></A>
<A NAME="DOC.2.94.33"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   void transformProvidingInverse(const <!1><A HREF="Matrix.html">osg::Matrix</A>&amp; matrix)</B></TT>
<DD>Transform the clipping set by provide a pre inverted matrix.
see transform for details. 
<DL><DT><DD></DL><P>
<A NAME="_maskStack"></A>
<A NAME="DOC.2.94.34"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>MaskStack _maskStack</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_resultMask"></A>
<A NAME="DOC.2.94.35"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>ClippingMask _resultMask</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_planeList"></A>
<A NAME="DOC.2.94.36"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>PlaneList _planeList</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_referenceVertexList"></A>
<A NAME="DOC.2.94.37"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>VertexList _referenceVertexList</B></TT>
<DL><DT><DD></DL><P></DL>

<HR><DL><DT><B>This class has no child classes.</B></DL>

<DL><DT><DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I></P><HR>
<BR>
This page was generated with the help of <A HREF="http://docpp.sourceforge.net">DOC++</A>.
</BODY>
</HTML>
